//
// C++ Implementation: topwindowscanner
//
// Description: 
//
//
// Author: Ernesto Barragan <ernestus *at* gmail.com>, (C) 2008
//
// Copyright: See COPYING file that comes with this distribution
//
//
#include <QWSWindow>
#include <QWSServer>
#include "topwindowscanner.h"

TopWindowScanner::TopWindowScanner(QObject *parent)
 : QObject(parent)
{
}

TopWindowScanner::~TopWindowScanner()
{
}

void TopWindowScanner::startScan() const
{
    QWSServer& windowServer = *QWSServer::instance() ;
    const QList<QWSWindow*> topWindowList = windowServer.clientWindows() ;
    QWSWindow *currentTopWindow ;
    foreach ( currentTopWindow, topWindowList )
    {
        found( *currentTopWindow ) ;
    }
}

void TopWindowScanner::found ( QWSWindow& window ) const
{
    emit signal_found( window )  ;
}

